//
//  WithDrawProgressCell.m
//  PPDL
//
//  Created by 王洋 on 2019/11/15.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "WithDrawProgressCell.h"

@implementation WithDrawProgressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)fillCellWithModel:(WithDrawProgressModel *)model {
    
    self.itemTitle.text = model.itemTitle;
    self.itemTime.text = model.itemTime;
    self.itemMemo.text = model.itemMemo;
    
    if (model.isFinish) {
        [self.itemIcon setImage:[UIImage imageNamed:@"progress_success"]];
        
        self.topLine.backgroundColor = UIColorHex(0x00aaee);
        self.bottomLine.backgroundColor = UIColorHex(0x00aaee);
        
        self.itemTitle.textColor = UIColorHex(0x00aaee);
        self.itemMemo.textColor = UIColorHex(0x00aaee);

    } else {
        [self.itemIcon setImage:[UIImage imageNamed:@"progress_fail"]];
        self.topLine.backgroundColor = UIColorHex(0x999999);
        self.bottomLine.backgroundColor = UIColorHex(0x999999);
        
        self.itemTitle.textColor = UIColorHex(0x999999);
        self.itemMemo.textColor = UIColorHex(0x999999);
    }
    
    if (model.isFirst) {
        self.topLine.hidden = YES;
    }
    
    if (model.isLast) {
        self.bottomLine.hidden = YES;
    }
}


@end
